package com.zuipin.enums;

/**
 * @ClassName: RocketMQTagEnum
 * @author xujinding
 * @time 2017年06月9日下午6:58:44
 */
public enum RocketMQTagEnum {
	
	ORDER_STATUS_CHANGE_AUDIT(2, "订单状态改---审核通过"), //
	ORDER_STATUS_CHANGE_CLOSE(4, "订单状态改---关闭订单"), //
	ORDER_STATUS_CHANGE_RECEIVE(8, "订单状态改---确认收货"), //
	TO_SYNC_PEODUCT_FROM_CBS(7081, "同步CBS商品信息"), //
	TO_MOD_PEODUCT_STATE_FROM_CBS(7082, "同步商品状态"), //
	TO_UPDATE_PRODUCT(6000, "商品同步"), // 跟旧系统一样
	TO_UPDATE_ERP_ID(8000, "商品同步接受erp商品Id"),//
	;
	
	private Integer	index;
	private String	name;
	
	private RocketMQTagEnum(Integer index, String name) {
		this.index = index;
		this.name = name;
	}
	
	public Integer getIndex() {
		return index;
	}
	
	public String getName() {
		return this.name;
	}
	
	public static String getName(Integer value) {
		if (value != null) {
			for (RocketMQTagEnum c : RocketMQTagEnum.values()) {
				if (c.getIndex().intValue() == value) {
					return c.getName();
				}
			}
		}
		return null;
	}
}
